package com.epfly.iface.promo.activity.enums;


import com.google.common.collect.Maps;

import java.util.Map;

/**
 * 档口类型:0.不限;1.指定档口
 */
public enum StoreStyleEnum {
    UN_LIMIT((byte) 0, "不限"), ASSIGN((byte) 1, "指定档口"),

    ;
    private final Byte key;

    private final String value;


    StoreStyleEnum(Byte key, String value) {
        this.key = key;
        this.value = value;
    }

    private static final Map<Byte, StoreStyleEnum> loopUp = Maps.newHashMap();

    static {
        for (StoreStyleEnum value : values()) {
            loopUp.put(value.getKey(), value);
        }
    }

    public static String getValue(Byte key) {
        return loopUp.get(key).getValue();
    }

    public Byte getKey() {
        return key;
    }

    public String getValue() {
        return value;
    }
}
